home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
352_01
/
vecrvrs.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-22
|
543b
|
31 lines
/* VECTOR_reverse ()
* reverse the time direction of a complex VECTOR
* used by cross correlation routine
*/
#include <stdlib.h>
#include "wtwg.h"
#include "dblib.h"
#include "Vector.h"
Vector& Vector::reverse ( void )
{
int vn = n; float *vv = v;
float hold;
float *vvend = vv+ vn;
while ( --vn >= 0 )
{
/* switch real part */
hold = *vv;
*(vv++) = *vvend;
*vvend = hold;
--vvend;
}
return (*this); /* Vector::reverse() */
}
// ----------------- end VECRVRS.CPP --------------